//
//  ButtonHandle.m
//  go
//
//  Created by 袁飞 on 12-7-19.
//
//

#import "ButtonHandle.h"
#import "cocos2d.h"
#import "FSwitch.h"

@implementation ButtonHandle
static ButtonHandle *_sharedButtonHandle = nil;

+ (ButtonHandle *)sharedButtonHandle
{
	if (!_sharedButtonHandle) {
    _sharedButtonHandle = [[ButtonHandle alloc] init];
	}
	return _sharedButtonHandle;
}

-(id)init{
  [super init];
  objs_ = [NSMutableArray array];
  [objs_ retain];
  return self;
}

-(void)setLayer:(test*)l{
  l_ = l;
}

-(void)addObject:(FObject*)obj{
  [objs_ addObject:obj];
}

-(void)onHandle:(NSString*)name{
  if([name compare:@"pause"] == NSOrderedSame){
  }
}

-(void)onSwithChange:(FControl*)ctrl{
  FSwitch *sw = ctrl;
  [l_ showList:![sw ison]];
}

@end
